﻿using System.Linq;
using Core.Contract.DataContract;
using Data.DAO;
using www.Models;

namespace Data.BO
{
    public class CategoryRefBO //: BaseBO<CategoryDAO, RelaxCategory>
    {
        #region value
        private readonly CategoryRefDAO _category = new CategoryRefDAO();

        #endregion


        #region Ham Lay du lieu

        public IQueryable<RelaxCategoryDataContract> GetCategoryDataContracts()
        {
            return _category.GetCategoryDataContracts();
        }

        public IQueryable<RelaxCategoryDataContract> GetCategoryDataContract()
        {
            return _category.GetCategoryDataContract();
        }
        #endregion

        #region ham Add
        public void Add(CATEGORY_REF category)
        {
            _category.Add(category);
        }

        #endregion

        #region ham Update

        public void Update(CATEGORY_REF category)
        {
            _category.Update(category);
        }
        
        #endregion

        #region Delete

        public void Delete(int iId)
        {
            _category.Delete(iId);
        }
        #endregion

    }
}
